home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-websites-
/
whdload
/
games
/
lionheart.lha
/
Lionheart
/
Install
next >
Wrap
Text File
|
1998-11-30
|
3KB
|
171 lines
;****************************
(set #sub-dir "") ;sub directory containing data files
(set #readme-file "Readme") ;name of readme file
(set #cleanup "") ;files to delete after install
;****************************
;----------------------------
; Checks if given program is reachable via the path
; if not abort install
; IN: #program - to check
; OUT: -
(procedure P_chkrun
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
)
)
(set #program "WHDLoad")
(P_chkrun)
(set #program "Patcher")
(P_chkrun)
;****************************
(if
(exists #readme-file)
(if
(= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(set @default-dest
(askdir
(prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
(help @askdir-help)
(default @default-dest)
(disk)
)
)
(set #dest (tackon @default-dest @app-name))
(if
(exists #dest)
(
(set #choice
(askbool
(prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if
(= #choice 1)
(run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
)
)
)
(makedir #dest
(help @makedir-help)
(infos)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source ("%s.slave" @app-name))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%s.inf" @app-name ))
(newname ("%s.info" @app-name ))
(dest #dest)
)
(if
(exists #readme-file)
(
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%s.info" #readme-file))
(dest #dest)
)
)
)
(if
(= #sub-dir "")
("")
(
(set #dest (tackon #dest #sub-dir))
(makedir #dest
(help @makedir-help)
)
)
)
(copyfiles
(help @copyfiles-help)
(source ("OSEMUMODULE80000.BIN"))
(dest #dest)
)
;----------------------------
(working "Please insert your Lionheart disk 1 in any drive.")
(
(set #AD_disk "Lionheart Disk 1")
(copyfiles
(help @copyfiles-help)
(source ("%s:" #AD_disk))
(dest #dest)
(pattern "(Lionheart|x_#?)")
)
)
(working "Please insert your Lionheart disk 2 in any drive.")
(
(set #AD_disk "Lionheart Disk 2")
(copyfiles
(help @copyfiles-help)
(source ("%s:" #AD_disk))
(dest #dest)
(pattern "(#?)")
)
)
(working "Please insert your Lionheart disk 3 in any drive.")
(
(set #AD_disk "Lionheart Disk 3")
(copyfiles
(help @copyfiles-help)
(source ("%s:" #AD_disk))
(dest #dest)
(pattern "(#?)")
)
)
(working "Please insert your Lionheart disk 4 in any drive.")
(
(set #AD_disk "Lionheart Disk 4")
(copyfiles
(help @copyfiles-help)
(source ("%s:" #AD_disk))
(dest #dest)
(pattern "~(#?_icon)")
)
)
(if (< 0 (run ("xfddecrunch >nil: SOURCE \"%s/Lionheart\" NA CLONE" #dest)))
(abort "XFD-Package not found!"))
;----------------------------
(run ("Delete %s ALL QUIET FORCE" #cleanup))
(exit)